﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using HttpTaskDbContext;
using FlightTicketDb;

namespace DbContextUnion
{
    public class DbContextBase
    {
        protected HttpTaskDbContext.HttpTaskDBContext _httpTaskDbContext;
        protected FlightTicketDb.FlightTicketDbContext _flightTicketDbContext;
        public HttpTaskDBContext _HttpTaskDbContext { get { return _httpTaskDbContext; } set { _httpTaskDbContext = value; } }
        public FlightTicketDbContext _FlightTicketDbContext { get { return _flightTicketDbContext; } set { _flightTicketDbContext = value; } }
        public DbContextBase()
        {
            _httpTaskDbContext = new HttpTaskDBContext();
            _flightTicketDbContext = new FlightTicketDbContext();
        }
        public DbContextBase(string conn1, string conn2)
        {
            _httpTaskDbContext = new HttpTaskDBContext(conn1);
            _flightTicketDbContext = new FlightTicketDbContext(conn2);
        }

    }
}
